package com.example.hy2110szyx.repository;

import com.example.hy2110szyx.entity.*;

import com.example.hy2110szyx.vo.ReservedVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ReservedMapper {

    /**
     * 按条件查询订单
     *
     * @return
     */

    List<ReservedTicket> queryByIdentity(String identity);


    /**
     * 按条件查询订单
     * @return
     */
    List<ReservedVo> queryAllConn(ReservedVo reservedTicket);


    /**
     * 根据身份证号查询用户
     *
     * @param identity
     * @return
     */


//    List<ReservedTicket> queryAllConn(ReservedTicket reservedTicket);



   // ReservedTicket queryByIdentity(String identity);



    /**
     * 插入一条订票信息
     *
     * @param reserved
     */
    void insertOne(ReservedTicket reserved);
    void insertOneRoute(Route route);
    void insertOneDistribution(Distribution distribution);
    void insertOneCustomer(Customer customer);
    void insertOneFlightInfo(FlightInfo flightInfo);


    /**
     * 根据身份证号删除订单
     * @param id
     */

    List<ReservedTicket> queryAll();

    void deleteSomeById(Integer id);

    void delOneFlightInfo(String fno);

    void delOneRoute(String rno);

    void delOneDistribution(String fno);

    void delOneCustomer(String identity);


}
